﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace yq
{
    /// <summary>
    /// 没有缓存的接口 - - 什么都没实现
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class NoCache<T> : yq.ICache.IClient<T> where T : class
    {
        public bool HashContains(string key)
        {
            return true;
        }
        public IList<T> HGet(IList<string> keys)
        {
            return new List<T>();
        }

        public T HGet(string key)
        {
            return default(T);
        }

        public IList<T> HGet(string[] keys)
        {
            return new List<T>();
        }

        public Dictionary<string, T> HGetAll()
        {
            return new Dictionary<string, T>();
        }

        public IList<string> HGetAllKeys()
        {
            return new List<string>();
        }

        public IList<T> HGetAllValues()
        {
            return new List<T>();
        }

        public int HGetCount()
        {
            return 0;
        }

        public bool HRemove()
        {
            return true;
        }

        public void HRemove(IList<int> keys)
        {
           
        }

        public void HRemove(IList<string> keys)
        {
           
        }

        public bool HRemove(string key)
        {
            return true;
        }

        public bool HRemoveAll()
        {
            return true;
        }


        public void HSet(Dictionary<string, string> dics)
        {
        }

        public void HSet(Dictionary<string, T> values)
        {
        }

        public void HSet(IList<string> keys, IList<T> values)
        {
        }

        public bool HSet(string key, T value)
        {
            return true;
        }

        public bool HSetIfNotExists(string key, T value)
        {
            return true;
        }

        public Dictionary<string, T> KGet(IList<string> keys)
        {
            return new Dictionary<string, T>();
        }

        public T KGet(string key)
        {
            return default(T);
        }

        public IList<T> KGetList(IList<string> keys)
        {
            return new List<T>();
        }

        public void KRemove(IList<string> keys)
        {
        }

        public bool KRemove(string key)
        {
            return true;
        }

        public IList<string> KSearchKeys(string pattern)
        {
            return new List<string>();
        }

        public IList<T> KSearchValues(string pattern)
        {
            return new List<T>();
        }

        public void KSet(Dictionary<string, T> value)
        {
          
        }

        public bool KSet(string key, T value)
        {
            return true;
        }

        public bool KSet(string key, T value, DateTime expiresTime)
        {
            return true;
        }

        public bool KSet(string key, T value, TimeSpan expiresIn)
        {
            return true;
        }

        public bool HashRefreshDelete(string fullname,string key)
        {
            return true;
        }


        public void HashRefreshLoad(string fullname, string key, object value)
        {
    
        }

        public bool HashRefreshDelete(string fullname)
        {
            return true ;
        }
    }
}
